
pkgname=openresolv
pkgver=3.9.0
pkgrel=1
pkgdesc="resolv.conf management framework (resolvconf)"
arch=('x86_64')
url="http://roy.marples.name/projects/openresolv"
license=('custom:BSD')
depends=('bash')
makedepends=('systemd')
backup=('etc/resolvconf.conf')
provides=('resolvconf')
source=("http://roy.marples.name/downloads/openresolv/${pkgname}-${pkgver}.tar.xz"
        'fs33801.patch')
md5sums=('177ad48b768d4d1bf37510f1af99dffe'
         '1e58ffbd83c55a7c51afb8a5d8b74742')

build() {
  cd ${pkgname}-${pkgver}
  #patch -p1 -i ${srcdir}/fs33801.patch

  ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/resolvconf
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
  sed -n '2,25{s:^# \?::;p}' resolvconf.in > ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}

